﻿using System;

namespace ContainerVariations.Common
{
    public interface IDoor
    {
        bool Open();
    }

    public class Door : IDoor
    {
        private readonly IKnob _knob;

        public Door(IKnob knob)
        {
            _knob = knob;
        }

        public bool Open()
        {
            _knob.Turn();
            Console.WriteLine("Door: Opening door.");
            return true;
        }
    }
}